import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
import Recommend from './../components/recommend/recommend'
import Singer from './../components/singer/singer'
import Search from './../components/search/search'
import Rank from './../components/rank/rank'
import SingerDetail from './../components/singer-detail/singer-detail'
export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/recommend'
    },
    {
      path: '/recommend',
      component:Recommend ,
    },
    {
      path: '/singer',
      component:Singer,
      children:[
        {
          path:":id",
          component:SingerDetail
        }

      ]
    },
    {
      path: '/search',
      component:Search,
    },
    {
      path: '/rank',
      component: Rank,
    },
  ]
})
